﻿//msgType:error,attention,success,information
function printMsg(message, msgType) {
    $("#msg > div").remove();
    var span = "<div class='notification " + msgType + " png_bg'> <a href='#' class='close'><img src='../resources/images/icons/cross_grey_small.png' title='关闭' alt='关闭' /></a><div>" + message + "</div></div>";
    $("#msg").append(span);

}

function printErrorMsg(message) {
    printMsg(message, "error");
}

function printAttentionMsg(message) { printMsg(message, "attention"); }

function printSuccessMsg(message) { printMsg(message, "success"); }
function printInformationMsg(message) { printMsg(message, "information"); }


function colorB(url,width,height) {
//    $("body").append("<div class='overlay1'></div>");
//    var docHieght = $(document).height();
//    $(".overlay1").height(docHieght).
//        css({
//            'opacity': 0.5,
//            'position': 'absolute',
//            'top': 0,
//            'left': 0,
//            'background': 'url(../images/overlay.png) repeat 0 0',
//            'width': '100%',
//            'z-index': 1000
//        });

    $.colorbox({ href: url,
        iframe: true,
        inline: true,
        opacity: 0.5,
        width: width,
        height: height,
        transition: "fade",
        scrolling: true,
        onClosed: function () {
            
           // window.location.reload();
        }
    });
}
